package com.qiwenshare.file.constant;

public enum ApproveTargetTypeEnum {
    ARCHIVE_DEPARTMENT_MANAGER(1, "档案归属部门领导"),
    USER_DEPARTMENT_MANAGER(2, "员工部门领导"),
    COMPANY_MANAGER(3, "总经理")
    ;


    private int type;
    private String desc;
    ApproveTargetTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static ApproveTargetTypeEnum getEnum(int type) {
        for (ApproveTargetTypeEnum ele : ApproveTargetTypeEnum.values()) {
            if (ele.getType() == type) {
                return ele;
            }
        }
        return null;
    }

    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }
}
